package leetcode;

/**
 * Created by Ghost on 2014/9/30 0030.
 */
public class Palindrome_Number {
    public static boolean isPalindrome(int x){
        if(x<0)
            return false;
        long xx = Math.abs(x);
        long reverse = 0;
        while(xx!=0){
            reverse = 10*reverse + xx%10;
            xx/=10;
        }
        return Math.abs(x) == reverse;
    }
    public static void main(String[] args){
        System.out.println(isPalindrome(-2147447412));
    }
}
